import Vue from "vue";
import VueRouter from "vue-router";
const Home = () => import("@/views/home/Home")
const Upload = () => import("@/views/upload/Upload")
const Mine = () => import("@/views/mine/Mine")
const Login = () => import("@/views/login/Login")
const Detail = () => import("@/views/home/children/bookDetail")
const bookStatus = () => import("@/views/mine/children/bookStatus")
const Say = () => import("@/views/mine/children/Say")
const SayList = () => import("@/views/mine/children/SayList")
const Message = () => import("@/views/mine/children/Message")
const ModifyInfo=()=>import("@/views/mine/children/ModifyInfo")
const routes = [{
    path: "/",
    redirect: "/home"
},{
    path: "/home",
    component: Home
},{
    path: "/home/:id",
    component: Detail,
    meta: {
        keepAlive:true
    }
},
{
    path: "/upload",
    component: Upload
},{
    path: "/mine",
    component: Mine
},{
    path: "/login",
    component: Login,
    meta: {
        keepAlive:true
    },
    // beforeEnter: (to, from, next) => {
        
    // }
},{
    path: "/bookstatus",
    component: bookStatus,
    meta: {
        keepAlive:true
    }
}, {
    path: "/say",
    component: Say,
    meta: {
        keepAlive:true
    }
}, {
    path: "/saylist",
    component: SayList,
    meta: {
        keepAlive:true
    }
}, {
    path: "/message",
    component: Message,
    meta: {
        keepAlive:true
    }
},{
    path: "/modify",
    component: ModifyInfo,
    meta: {
        keepAlive:true
    }
}]
Vue.use(VueRouter)
const router = new VueRouter({
    routes,
    mode: "history"
})
export default router